buildTranslations
fun <T : Any> buildTranslations(kClass: KClass<T>, id: Identifier, lang: String, logWarnings: Boolean, builder: BiConsumer<String, String>)
Applies a set of translations for the provided class object to the provided builder. Uses Translatable.Name, Translatable.Desc, and Translatable.Prefix annotations to power the generation. TomlComment and Comment can be used to provide en_us description lang.
Author
fzzyhmstrs
Since
0.7.0
Parameters
kClass
KClass instance for the config to generate lang for
id
Identifier the identifier used to register the config
lang
The applicable lang code to generate for, e.g. "en_us" or "es_mx". The builder will look for annotations with matching codes to apply.
logWarnings
If true, Fzzy Config will log warnings for every missing name, description, and prefix; if false only missing names will be logged.
builder
BiConsumerTranslationBuilder::add